From: Gustavo Noronha Silva Date: Mon, 9 Nov 2009 17:54:44 +0000 (-0200) Subject: Don't require applications to accept URIs for recent files X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~10682 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ae744bf2065d8c49625c800ea8b67e75adbeba31;p=gnome-shell.git Don't require applications to accept URIs for recent files This should not be required, since glib correctly deals with such applications by giving them the local gvfs path, and those applications which do support URIs keep being able to use the URIs in GFiles. Based on original work by Guido Günther . https://bugzilla.gnome.org/show_bug.cgi?id=601287 --- diff --git a/js/misc/docInfo.js b/js/misc/docInfo.js index 021dce412..8123e281b 100644 --- a/js/misc/docInfo.js +++ b/js/misc/docInfo.js @@ -36,8 +36,8 @@ DocInfo.prototype = { // shorter in terms of lines of code, we are not doing so // because that would duplicate the work of retrieving the // mime type. - - let appInfo = Gio.app_info_get_default_for_type(this.mimeType, true); + let needsUri = Gio.file_new_for_uri(this.uri).get_path() == null; + let appInfo = Gio.app_info_get_default_for_type(this.mimeType, needsUri); if (appInfo != null) { appInfo.launch_uris([this.uri], Main.createAppLaunchContext());